import request from "@/utils/request";

const baseURL = "/wx-mini-app";

/**
 * 生成小程序二维码
 */
export const createQrCode = (data: {
  scene: string;
  page?: string;
  width?: number;
  checkPath?: boolean;
  envVersion?: string;
  autoColor?: boolean;
  lineColor?: { r: string; g: string; b: string };
  isHyaline?: boolean;
}) =>
  request<ArrayBuffer>({
    url: `${baseURL}/create-qr-code`,
    method: "post",
    data,
    responseType: "arraybuffer",
  });
